//
//  ShellLaunchViewController.m
//  ShellWallert
//
//  Created by lvzhao on 2019/10/17.
//  Copyright © 2019 VV. All rights reserved.
//

#import "ShellLaunchViewController.h"
#import "LZBaseTabBarViewController.h"
#import "Lottie.h"

@interface ShellLaunchViewController ()
@property (nonatomic,strong) LOTAnimationView *lottieLogo;

@end

@implementation ShellLaunchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    //启动开启动画
    self.lottieLogo = [LOTAnimationView animationNamed:@"launch"];
    self.lottieLogo.frame = CGRectMake(0, 0, K_SCREENWIDTH, K_SCREENHEIGHT);
    self.lottieLogo.contentMode = UIViewContentModeScaleAspectFill;
    [self.view addSubview:self.lottieLogo];
    @weakify(self);
    [self.lottieLogo playWithCompletion:^(BOOL animationFinished) {
        @strongify(self);
        [self.lottieLogo removeFromSuperview];
        LZBaseTabBarViewController *tabbarVC = [[LZBaseTabBarViewController alloc] init];
        UIWindow *window = [UIApplication sharedApplication].keyWindow;
        window.rootViewController = tabbarVC;
    }];

}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
